<template>
    <div class="month-select">
        <el-date-picker v-model="month" type="month" placeholder="选择月份" />
    </div>

    <el-button-group class="btn-group">
        <el-button
            class="btn"
            type="primary"
            v-debounce="createFee"
            size="large"
        >
            生成月结费用
        </el-button>
        <el-button
            class="btn"
            type="primary"
            v-debounce="cancelFee"
            size="large"
        >
            撤销月结费用
        </el-button>
    </el-button-group>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Request } from '@/app/request';

const month = ref<Date>();
const createFee = async () => {
    // return true;
    const req = new Request('生成月结费用', {
        month: month.value,
    });
    const r = await req.post();
};
const cancelFee = async () => {
    // return true
    const req = new Request('撤销月结费用', {
        month: month.value,
    });
    const r = await req.post();
};
</script>
<style lang="scss" scoped>
.month-select {
    margin-bottom: 10px;
}
.btn-group {
    .btn {
        margin-right: 5px;
    }
}
</style>
